def yanghui(n):
        if n==0:
            return []
        if n==1:
            return[[1]]
        if n==2:
            return [[1],[1,1]]
        n-=2
        ans=[[1],[1,1]]
        while n>0:
            nl=[1]
            for i in range(len(ans[-1])-1):
                nl.append(ans[-1][i]+ans[-1][i+1])
            nl.append(1)
            ans.append(nl)
            n-=1
        return ans

print(yanghui(10))